/**
 * 
 */
package com.epam.training.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.epam.training.domain.User;

/**
 * @author Bogdan
 *
 */
public interface UserRepository extends JpaRepository<User, Integer> {
	@Query("SELECT u FROM User u WHERE u.login = ?1 AND u.password = ?2")
	User findByUserLoginAndPassword(String login, String password);

	User findByLogin(String login);
}
